package com.dangdang.action.cart;

import com.dangdang.action.BaseAction;
import com.dangdang.domain.User;
import com.dangdang.service.CartService;
import com.dangdang.service.ServiceFactory;

/**
 * 显示购物车控制层
 * 
 * @author Wangpeihu
 * @team [Never give up]
 * @since JDK1.6(建议)
 * @date 2010-1-29
 */
public class ShowCartAction extends BaseAction {

	/** 转到此地的URI */
	private String uri;

	/**
	 * 
	 * @return
	 */
	public String execute() {
		cart = ServiceFactory.getCartService(session);
		User user = cart.getUser();
		if (user != null) {
			return "success";
		}
		return "success";
	}

	public String getUri() {
		return uri;
	}

	public void setUri(String uri) {
		this.uri = uri;
	}

	private CartService cart;

	public CartService getCart() {
		return cart;
	}

	public void setCart(CartService cart) {
		this.cart = cart;
	}
}
